function answerToReq(reqType, topic, res){
	$.get("/common/actions.php", { reqType: reqType, topic: topic, res: res });
}

function AcceptRequest(topic_id, row_id, lang_id, on_receive)
{
	$.ajax({
		type: "GET",
		url: "/common/actions.php?topic=" + topic_id + "&lang_id=" + lang_id + "&action=accept&rqid=" + row_id,
		async: false,
		success: function(data){
			data=eval("("+data+")");
			if (typeof on_receive == 'function') on_receive(data);
		}
	});
	//$.getJSON("/common/actions.php?topic=" + topic_id + "&lang_id=" + lang_id + "&action=accept&rqid=" + row_id, on_receive);
}

function DeclineRequest(topic_id, row_id, lang_id, on_receive)
{
	$.ajax({
		type: "GET",
		url: "/common/actions.php?topic=" + topic_id + "&lang_id=" + lang_id + "&action=decline&rqid=" + row_id,
		async: false,
		success: function(data){
			data=eval("("+data+")");
			if (typeof on_receive == 'function') on_receive(data);
		}
	});
	//$.getJSON("/common/actions.php?topic=" + topic_id + "&lang_id=" + lang_id + "&action=decline&rqid=" + row_id, on_receive);
}

function IgnoreRequest(i_id, t_id, on_receive)
{
	$.ajax({
		type: "GET",
		url: "/common/actions2.php?i_id="+i_id+"&t_id="+t_id+"&act=ignore",
		async: false,
		success: function(data){
			data=eval("("+data+")");
			if (typeof on_receive == 'function') on_receive(data);
		}
	});
	//$.getJSON("/common/actions2.php?i_id="+i_id+"&t_id="+t_id+"&act=ignore", on_receive);
}

function ReIgnoreRequest(i_id, t_id, on_receive)
{
	$.ajax({
		type: "GET",
		url: "/common/actions2.php?i_id="+i_id+"&t_id="+t_id+"&act=reignore",
		async: false,
		success: function(data){
			data=eval("("+data+")");
			if (typeof on_receive == 'function') on_receive(data);
		}
	});
	//$.getJSON("/common/actions2.php?i_id="+i_id+"&t_id="+t_id+"&act=reignore", on_receive);
}


